<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#div01{
				width: 300px;
				height: 300px;
				background-color: palevioletred;
			}
		</style>
	</head>
	<body>
		<div id="div01"></div>
		<img id="img01" src="下载.jpg" />
		<script type="text/javascript">
			div01.onclick=function(){div01.textContent="鼠标单击了";}
			div01.ondblclick=function(){div01.textContent="鼠标双击了";}
			div01.onmousedown=function(){div01.textContent="鼠标按下了";}
			div01.onmouseup=function(){div01.textContent="鼠标抬起";}
			div01.onmouseover=function(){div01.textContent="鼠标移入";}
			div01.onmouseout=function(){div01.textContent="鼠标移出";}
			div01.onmousemove=function(){div01.textContent="鼠标移动"+event.clientX+","+event.clientY;}
			
			img01.onmouseover=function(){
				img01.style.opacity=0.5;
			}
			img01.onmouseout=function(){
				img01.style.opacity=1;
			}
			
		</script>
	</body>
</html>
